package com.wxapp.common.core.filter.except;


import com.wxapp.common.constant.enums.ResultEnum;

/**
 * @author lgl
 * @Description 登录异常
 */
public class LoginException extends Exception {
    private final int code;

    public LoginException(ResultEnum resultEnum) {
        super(resultEnum.getDesc());
        this.code = resultEnum.getValue();
    }

    public LoginException(String msg) {
        super(msg);
        this.code = ResultEnum.REQUEST_TIMEOUT.getValue();
    }

    public LoginException() {
        super(ResultEnum.REQUEST_TIMEOUT.getDesc());
        this.code = ResultEnum.REQUEST_TIMEOUT.getValue();
    }

    public int getCode() {
        return code;
    }
}
